/*
 * Copyright(C) 2013-2017 AnZhouInc.ALL Rights Reserved.
 *
 * FileName: TestController
 * 
 * Description: xxxxx
 *
 * History:
 * 版本号    作者    日期    操作
 * 1.0    ZhouFan 2018/2/11 0011   x
 * ...
 */
package com.fantazy.springswaggerdemo.controller;

import com.fantazy.springswaggerdemo.model.OutResult;
import com.fantazy.springswaggerdemo.model.UserForm;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author ZhouFan
 * @version 1.0
 * @date 2018/2/11 0011
 * @see
 */
@Controller
@RequestMapping(value = "/test", consumes = "application/json", produces = "application/json")
public class TestController {

    private static final Logger LOGGER = LoggerFactory.getLogger( TestController.class );

    @ApiOperation( value="swagger test",notes = "swagger test first",tags = {"a","b","c"})
    @RequestMapping(value = "/first", method = RequestMethod.POST)
    @ResponseBody
    @ApiParam(required = true,name="userForm",value="用户表单")
    public OutResult<String> first( @RequestBody UserForm userForm ) {
        LOGGER.info( "first userForm={}", userForm );
        throw new RuntimeException( "dd" );
    }

}
